package com.ziyucoding.springboot.labs.lab4.starter.ziyuserver.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 配置属性类
 *
 * @author ziyucoding
 * @date 2023-02-17
 **/
@ConfigurationProperties(prefix = "ziyu.server")
public class ZiyuServerProperties {

    /**
     * 默认端口
     */
    private static final Integer DEFAULT_PORT = 8090;

    /**
     * 端口
     */
    private Integer port = DEFAULT_PORT;

    /**
     * 获取默认端口
     *
     * @return Integer
     */
    public static Integer getDefaultPort() {
        return DEFAULT_PORT;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

}
